/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-08-20 11:48:37
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
//  资讯列表查询
export const queryNews = params => axios.post(`${SERVER.INFORMATION}/materiel/list`, {  page:params.pageNum, ...params });
//  新增或更新资讯
export const saveNews = params => axios.post(`${SERVER.INFORMATION}/materiel/save`, params);
//  删除资讯
export const deleteNews = id => axios.post(`${SERVER.INFORMATION}/materiel/delete?id=${id}`);
//  发布资讯
export const releaseNews = id => axios.post(`${SERVER.INFORMATION}/materiel/release?id=${id}`);
//  撤销已发布的资讯
export const revokeNews = id => axios.post(`${SERVER.INFORMATION}/materiel/revoke?id=${id}`);

//  tcCodeList 所有下拉框选项接口
export const tcCodeList = typeCode => axios.get(`${SERVER.INFORMATION}/dicts/query/`, { params:{type: typeCode} });
